package hu.veilingsite.server;

import hu.veilingsite.shared.Auction;
import hu.veilingsite.shared.Bid;
import hu.veilingsite.shared.Category;

import java.util.ArrayList;

public interface VeilingsiteDAO {
	////User
	//set
	public boolean insertUser(User user);
	public boolean saveUser(User user);
	//get
	public ArrayList<User> getUsers();
	public User getUser(int userId);
	public User getUser(String email);
	public String getNameOfUser(int id);
	public ArrayList<Bid> getBidsFromUser(int userId);
	public ArrayList<Auction> getAuctionsFromUser(int userId);
	public int getCreditsFromUser(int userId);
	
	////Auction
	//set
	public boolean insertAuction(Auction auction);
	public boolean saveAuction(Auction auction);
	public void deleteAuction(int id);
	//get
	public ArrayList<Auction> getAuctions();
	public ArrayList<Auction> getAuctionsAdmin();
	public ArrayList<Auction> getLatestAuctions();
	public Auction getAuction(int auctionId);
	public ArrayList<Bid> getBidsFromAuction(int auctionId);
	
	////Bid
	//set
	public boolean insertBid(Bid bid);
	public boolean saveBid(Bid bid);
	public boolean deleteBid(int bidId);
	//get
	public Bid getBid(int bidId);
	public User getUserFromBid(int bidId);
	
	////Category
	//set
	public boolean insertCategory(Category category);
	public boolean saveCategory(Category category);
	public boolean deleteCategory(int id);
	//get
	public ArrayList<Category> getCategorys();
	public Category getCategory(int categoryId);
	
	//Credits
	public int getAantal(String code);
	public boolean verwijderCoupon(String code);
}
